/*
 *NOTE:Auto generated service implement
*/
package com.surfilter.modules.syslog.service.impl;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Service;

import com.surfilter.modules.syslog.dao.PlSyslogDao;
import com.surfilter.modules.syslog.model.PlSyslogModel;
import com.surfilter.modules.syslog.model.SyslogQueryCondition;
import com.surfilter.modules.syslog.service.SysLogMgrService;
import com.surfilter.platform.base.model.ActionPermission;
import com.surfilter.platform.base.model.PageInfo;
import com.surfilter.platform.base.model.ParameterClassType;
import com.surfilter.platform.base.model.ParameterInfo;
import com.surfilter.platform.base.model.ParameterMapper;
import com.surfilter.platform.base.model.PermissionMethodType;
import com.surfilter.platform.base.service.ServiceBase;

@Service(value = "SysLogMgrService")
public class SysLogMgrServiceImpl extends ServiceBase implements SysLogMgrService {

	@Resource
	private PlSyslogDao plSyslogDao;
	
	@ActionPermission(actionName = "addPlSyslog",remark = "",permission=PermissionMethodType.INNER)
	public int addPlSyslog(PlSyslogModel plSyslogModel) {
		return plSyslogDao.addPlSyslog(plSyslogModel);
	}
	
	@ActionPermission(actionName = "chgPlSyslog",remark = "")
	public void chgPlSyslog(PlSyslogModel plSyslogModel, HttpServletRequest request) {
		plSyslogDao.chgPlSyslog(plSyslogModel);
	}
	
	@ActionPermission(actionName = "delPlSyslog",remark = "")
	public void delPlSyslog(PlSyslogModel plSyslogModel, HttpServletRequest request) {
		plSyslogDao.delPlSyslog(plSyslogModel);
	}
	
	@ActionPermission(actionName = "getPlSyslogs",remark = "查看系统日志")
	public List<PlSyslogModel> getPlSyslogs(PlSyslogModel plSyslogModel, HttpServletRequest request) {
		return plSyslogDao.getPlSyslogs(plSyslogModel, PageInfo.getPageInfo(request));
	}
	
	@ActionPermission(actionName = "delPlSyslogs",remark = "")
	@ParameterMapper({ @ParameterInfo(mapName = "ids", componentType = Integer.class, index = 0, mapType = ParameterClassType.ARRAY) })
	public boolean delPlSyslogs(List<Integer> ids){
		plSyslogDao.delPlSyslogs(ids);
		return true;
	}
	@ActionPermission(actionName = "querySysLogByCondition",remark = "查看系统日志")
	public List<PlSyslogModel> getPlSyslogsByCondition(SyslogQueryCondition condition,HttpServletRequest request){
		 return plSyslogDao.querySyslogsByCondition(condition,PageInfo.getPageInfo(request));
	}
	
	@ActionPermission(actionName = "getPlSyslogsCount",remark = "")
	public int getPlSyslogsCount(PlSyslogModel plSyslogModel) {
		return plSyslogDao.getPlSyslogsCount(plSyslogModel);
	}
	
	@ActionPermission(actionName = "querySysLogByConditionCount",remark = "查看系统日志")
	public int getPlSyslogsByConditionCount(SyslogQueryCondition condition){
		 return plSyslogDao.querySyslogsByConditionCount(condition);
	}
}
